package model.dao.registerOrder;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;

import log.MyLogger;

public class ServiceActionStatusTypeDAOImpl {
	
	String sql = "" ;
	db.dbconnection dbconnection ;
	Connection myConnection ;
	Statement st ;
	
	public String getTypeNameByServiceActionStatusTypeId(int id) {
		if(id <= 0)
			return null;
		String _return = null;
		try {
			myConnection = dbconnection.getConnection();
			Statement st = myConnection.createStatement();
			String sql = "SELECT type_name FROM service_action_status_type WHERE service_action_status_type = "+id;
			ResultSet rs = st.executeQuery(sql);
			while(rs.next()){
				_return = rs.getString("type_name");
			}
			this.dbconnection.close();
		} catch (Exception e) {
//			MyLogger.Log("ServiceActionStatusTypeDAOImpl.getTypeNameByServiceActionStatusTypeId()", e.getMessage());
			return null;
		}
		return _return;
	}

}
